//
//  NSObject+MapNavigation.h
//  KX11UI
//
//  Created by HYC on 2021/2/24.
//

#import <Foundation/Foundation.h>
//#import <AMapFoundationKit/AMapUtility.h>
//#import <AMapSearchKit/AMapSearchKit.h>
//#import <AMapFoundationKit/AMapFoundationKit.h>
#import <BaiduMapAPI_Base/BMKBaseComponent.h>
#import <BaiduMapAPI_Search/BMKSearchComponent.h>
#import <BaiduMapAPI_Map/BMKPolyline.h>
#import <BaiduMapAPI_Map/BMKMapView.h>

//@class MapNavigationModel;
NS_ASSUME_NONNULL_BEGIN

@interface NSObject (Tools_HYC_Neusoft)



/// 最后一公里弹窗
/// @param coord 终点坐标
/// @param endName 重点名字
/// @param mapImageUrl 终点图片url
- (void)addLast_One_km_alertWithCoord:(CLLocationCoordinate2D)coord andEndName:(NSString *)endName andMapImageUrl:(NSString *)mapImageUrl;


- (NSArray *)bd09LLToGPSLat:(double)glat lon:(double)glon;
/**
 百度坐标转高德坐标

 @param glat 纬度
 @param glon 经度
 @return 数组【转换后的纬度，转换后的经度】
 */
- (NSArray *)bd09llToGCJLat:(double)glat lon:(double)glon;
- (void)mapViewFitPolyline:(BMKPolyline *)polyline withMapView:(BMKMapView *)mapView withUIEdgeInsets:(UIEdgeInsets)edgeInsets;

//
//
///// 调起百度导航
///// @param model 位置信息
//-(void) onDaoHangForBaiDuMap:(MapNavigationModel *)model withCoordinateType:(AMapCoordinateType)type;
//
///// 调起高德导航
///// @param model 位置信息
//-(void) onDaoHangForGaoDeMap:(MapNavigationModel *)model withCoordinateType:(AMapCoordinateType)type;
//
///// 调起苹果导航
///// @param model 位置信息
//-(void)onDaoHangForIOSMap:(MapNavigationModel *)model withCoordinateType:(AMapCoordinateType)type;
//
//
///// 你地理编码编译
///// @param lat lat
///// @param log log
///// @param type 经纬度类型
///// @param success 成功
///// @param errors 失败
- getMapCLPlacemarkWithLat:(CGFloat)lat WithLog:(CGFloat)log WithAMapCoordinateType:(BMK_COORD_TYPE)type success:(void (^)(BMKReverseGeoCodeSearchResult *result))success error:(void (^)(BMKSearchErrorCode * _Nullable error))errors;


//////POI搜索
- getMapPOIsWithRequest:(BMKPOINearbySearchOption *)request success:(void (^)(BMKPOISearchResult *result))success error:(void (^)(BMKSearchErrorCode * _Nullable error))errors;
//////SUG搜索
- getMapSUGWithKey:(NSString *)name WithCity:(NSString *)cityName WithCoo:(CLLocationCoordinate2D)coord success:(void (^)(BMKSuggestionSearchResult *result))success error:(void (^)(BMKSearchErrorCode * _Nullable error))errors;

/// 线路规划
- getMapRouteWithStart:(BMKPlanNode *)start End:(BMKPlanNode *)end success:(void (^)(BMKDrivingRouteResult *result))success error:(void (^)(BMKSearchErrorCode * _Nullable error))errors;



@end
//
//
@interface GEE_AMapSearchD : UIViewController
//
@property (nonatomic, copy) void (^searchCLPlacemarkBlock)(BMKReverseGeoCodeSearchResult *result,BMKSearchErrorCode *error);
@property (nonatomic, copy) void (^searchPOIResultBlock)(BMKPOISearchResult *result,BMKSearchErrorCode *error);
@property (nonatomic, copy) void (^searchSUGResultBlock)(BMKSuggestionSearchResult *result,BMKSearchErrorCode *error);
@property (nonatomic, copy) void (^searchRouteResultBlock)(BMKDrivingRouteResult *result,BMKSearchErrorCode *error);


+ (GEE_AMapSearchD *)sharedManager;





// MARK: - 百度逆地理编码代理
- searchReverseWith:(CGFloat)latitude_AMap With:(CGFloat)longitude_AMap;
// MARK: - 百度POI搜索
- searchPOINearbyWith:(BMKPOINearbySearchOption *)poiNearby;
// MARK: - 百度SUG搜索
- searchSUGWithStr:(NSString *)searchStr WithCity:(NSString *)cityName withCoo:(CLLocationCoordinate2D)coord;
// MARK: - 驾车线路规划
- searchRouteWithBMKPlanNodeStart:(BMKPlanNode *)start End:(BMKPlanNode *)end;
@end

NS_ASSUME_NONNULL_END
